﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace XueMeng.Common
{
    public class Function
    {
        #region
        /*正则验证数字*/
        /// <summary>
        /// 正则验证数字
        /// </summary>
        /// <param name="str">待验证字符串</param>
        /// <returns></returns>
        public static bool RegexNumber(string str)
        {
            Regex regex = new Regex("^[0-9]*$");
            return regex.IsMatch(str);
        }
        #endregion
    }
}
